package com.cn.kehong.domain;

import com.cn.kehong.utils.CommonUtil;
import com.google.common.collect.ImmutableMap;

import java.util.Date;
import java.util.Map;

public class LaborRate {
    private String id;

    private String factoryName;
    private String laborTime;

    private String targetLaborRate;

    private String actualOutput;

    private String actualAttendance;

    private String actualHour;

    private String actualLaborRate;

    private String achievementRate;

    private String experimentalMaterialOutput;

    private String experimentMaterialTime;

    private String experimentalMaterialLaborRate;

    private String laborResult;
    private String labStatus;

    private String status;

    private Date createTime;

    private Date updateTime;

    private String remark;

    private String createUserId;

    private String createUserName;

    private int count;

    private LaborAttendRecord laborAttendRecord;

    public static final transient Map<String, String> RESULTSTATUSMAP =
            ImmutableMap.of("0", "未完成", "1", "已完成");

    public static final transient Map<String, String> STATUSMAP =
            ImmutableMap.of("0", "编制中", "1", "已完成");


    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id == null ? null : id.trim();
    }

    public String getFactoryName() {
        return factoryName;
    }

    public void setFactoryName(String factoryName) {
        this.factoryName = factoryName == null ? null : factoryName.trim();
    }

    public String getTargetLaborRate() {
        return targetLaborRate;
    }

    public void setTargetLaborRate(String targetLaborRate) {
        this.targetLaborRate = targetLaborRate == null ? null : targetLaborRate.trim();
    }

    public String getActualOutput() {
        return actualOutput;
    }

    public void setActualOutput(String actualOutput) {
        this.actualOutput = actualOutput == null ? null : actualOutput.trim();
    }

    public String getActualAttendance() {
        return actualAttendance;
    }

    public void setActualAttendance(String actualAttendance) {
        this.actualAttendance = actualAttendance == null ? null : actualAttendance.trim();
    }

    public String getActualHour() {
        return actualHour;
    }

    public void setActualHour(String actualHour) {
        this.actualHour = actualHour == null ? null : actualHour.trim();
    }

    public String getActualLaborRate() {
        return actualLaborRate;
    }

    public void setActualLaborRate(String actualLaborRate) {
        this.actualLaborRate = actualLaborRate == null ? null : actualLaborRate.trim();
    }

    public String getAchievementRate() {
        return achievementRate;
    }

    public void setAchievementRate(String achievementRate) {
        this.achievementRate = achievementRate == null ? null : achievementRate.trim();
    }

    public String getExperimentalMaterialOutput() {
        return experimentalMaterialOutput;
    }

    public void setExperimentalMaterialOutput(String experimentalMaterialOutput) {
        this.experimentalMaterialOutput = experimentalMaterialOutput == null ? null : experimentalMaterialOutput.trim();
    }

    public String getExperimentMaterialTime() {
        return experimentMaterialTime;
    }

    public void setExperimentMaterialTime(String experimentMaterialTime) {
        this.experimentMaterialTime = experimentMaterialTime == null ? null : experimentMaterialTime.trim();
    }

    public String getExperimentalMaterialLaborRate() {
        return experimentalMaterialLaborRate;
    }

    public void setExperimentalMaterialLaborRate(String experimentalMaterialLaborRate) {
        this.experimentalMaterialLaborRate = experimentalMaterialLaborRate == null ? null : experimentalMaterialLaborRate.trim();
    }

    public String getLaborResultCn() {
        return RESULTSTATUSMAP.get(getLaborResult());
    }
    public String getLaborResult() {
        return laborResult;
    }

    public void setLaborResult(String laborResult) {
        this.laborResult = laborResult == null ? null : laborResult.trim();
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status == null ? null : status.trim();
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark == null ? null : remark.trim();
    }

    public String getCreateUserId() {
        return createUserId;
    }

    public void setCreateUserId(String createUserId) {
        this.createUserId = createUserId == null ? null : createUserId.trim();
    }

    public String getCreateUserName() {
        return createUserName;
    }

    public void setCreateUserName(String createUserName) {
        this.createUserName = createUserName == null ? null : createUserName.trim();
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    public String getCreateTimeFt(){
        String formatTime = CommonUtil.getStrTime(getCreateTime(),"yyyy-MM-dd HH:mm:ss");
        return formatTime;
    }


    public LaborAttendRecord getLaborAttendRecord() {
        return laborAttendRecord;
    }

    public void setLaborAttendRecord(LaborAttendRecord laborAttendRecord) {
        this.laborAttendRecord = laborAttendRecord;
    }

    public String getLabStatusCn() {
        return STATUSMAP.get(getLabStatus());
    }

    public String getLabStatus() {
        return labStatus;
    }

    public void setLabStatus(String labStatus) {
        this.labStatus = labStatus;
    }

    public String getLaborTime() {
        return laborTime;
    }

    public void setLaborTime(String laborTime) {
        this.laborTime = laborTime;
    }
}